﻿#region :: File Specification ::
/************************ Code File Header ****************************
Author:       v0cn306 Archer Chen    
Date:          2012 June 28    
Description:Include all business models used in AutoMapper learning 

Modification History:
Editor                    Date                      Comment

*******************************************************************/
#endregion
      
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeStudy.AutoMapper.BusinessModels
{
    /// <summary>
    /// The business model of order
    /// </summary>
    public class Order
    {
        public int OrderID { get; set; }
        public Customer Customer { get; set; }
        public List<OrderLine> OrderLines { get; set; }

        public DateTime CreatedTime { get; set; }
        public OrderState State { get; set; }
    }

    /// <summary>
    /// The buiness model of customer
    /// </summary>
    public class Customer
    {
        public int CustomerID { get; set; }
        public string Name { get; set; }
        public string Address { get; set; }
        public string Email { get; set; }
    }

    /// <summary>
    /// The business model of order line
    /// </summary>
    public class OrderLine 
    {
        public Order Order { get; set; }
        public int OrderLineID { get; set; }
        public Product Product { get; set; }
        public DateTime AddedTime { get; set; }
        public int ProductCount { get; set; }
        public float Discount { get; set; }
    }

    /// <summary>
    /// The business model of product
    /// </summary>
    public class Product 
    {
        public int ProductID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public decimal Price { get; set; }
    }
}
